/**
 * Copyright (C), 2019-2022, 宇信融汇
 * FileName: Test3
 * Author:   666
 * Date:     2022/1/15 23:49
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 666           修改时间           版本号              描述
 */
package com.abstractdemo;

import javax.swing.*;

/**
 * @Classname Test3
 * @Description TODO
 * @Date 2022/1/15 23:49
 * @Created by 666
 */
public class Test3 {
    public static void main(String[] args) {
        JFrame win = new JFrame("登录窗口");
        JButton btn = new JButton("登录");
        JPanel p = new JPanel();
        win.add(p);
        p.add(btn);
        win.setSize(300,300);
        win.setVisible(true);
        win.setLocationRelativeTo(null);
//        btn.addActionListener(new AbstractAction() {
//            @Override
//            public void actionPerformed(ActionEvent e) {
//                JOptionPane.showMessageDialog(win,"12344");
//            }
//        });
        btn.addActionListener(e -> JOptionPane.showMessageDialog(win,"12344"));
    }
}
